package com.ruoyi.worklog.mapper;

import com.ruoyi.worklog.domain.WlLeaderMember;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author cw
 * @Date 2022/7/28 - 07 - 28
 * @Description com.ruoyi.worklog.mapper
 */
public interface WlLeaderMemberMapper {

    //是否存在
    int countLeaderMember(@Param("leader_id") long leader_id,@Param("member_id") long member_id);
    //通过组长 查 组员
    List<Long> selectMembers(Long leader_id);
    //通过 组员 查组长
    List<Long> selectLeader(Long member_id);
    //插入
    int insertLeaderMember(WlLeaderMember wl_leader_member);
    //删除
    int deleteLeaderMember(@Param("leader_id") long leader_id,@Param("member_id") long member_id);
    //通过删除ledaerid，则所有关系都删除
    int deleteLeaderMemberByLeader(@Param("leader_id") long leader_id);
    //
    int deleteLeaderMemberByMember(@Param("member_id") long member_id);
}
